package mianshi;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * TOOD
 *
 * @author long
 * @date 2020-08-10 15:48
 */
public class RegExpTest {
    public static void main(String[] args){
        String str="汕头市(潮阳区)(潮南区)(金平区)";
        Pattern p=Pattern.compile(".*?(?=\\()");
        Matcher m=p.matcher(str);
        if (m.find()){
            System.out.println(m.group());
        }
    }

}
